tracking
Table Name: tracking
The tracking table is used to log and store location tracking data for mapped entities, such as users or vaccinators. This table captures geographic coordinates, timestamps, and other metadata for tracking purposes.
Columns
| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| mappedId | int(11) | The identifier of the entity being tracked, potentially linked to another table. | |
| latitude | varchar(45) | The latitude coordinate of the tracked entity's location. | |
| longitude | varchar(45) | The longitude coordinate of the tracked entity's location. | |
| trackingDate | date | NOT NULL | The date when the tracking data was recorded. |
| geopoint | varchar(45) | A combined representation of latitude and longitude. | |
| location | varchar(255) | A textual description or address of the tracked location. | |
| createdByUserId | int(11) | The ID of the user who created the tracking record. | |
| editedByUserId | int(11) | The ID of the user who last edited the tracking record. | |
| createdDate | datetime | The timestamp when the tracking record was created. | |
| lastEditedDate | datetime | The timestamp when the tracking record was last edited. | |
| trackingType | varchar(255) | The type or category of the tracking event. | |
| trackingTime | time | NOT NULL | The time when the tracking data was recorded. |
| reference | varchar(255) | A reference identifier for the tracking event. | |
| trackingId | int(11) | Primary Key, Auto-Inc | Unique identifier for each tracking record. |
| accuracy | varchar(45) | The accuracy level of the tracking data, if applicable. |
Indexes
- Primary Key:
- trackingId: Ensures each tracking record has a unique identifier.
- Additional Indexes:
- idx_reference: Index on the reference column for efficient lookups by reference identifier.
- idx_tracking_date: Index on the trackingDate column for quick queries based on the tracking date.
- idx_mapped_id: Index on the mappedId column for efficient lookups by the tracked entity's identifier.
Usage Notes
- Purpose:
- To log tracking data, including location coordinates, timestamps, and associated metadata.
- Useful for applications requiring monitoring, auditing, or reporting of location data.
- Reference Usage:
- The reference column allows associating tracking records with external systems or events.